const Admin = require("./Admin")
const ReadTable = require('./readTable')
const Book = require("./book")
const User = require("./User")
const md5 = require('md5')
const sequelize = require('./db')
const BookList = require("./bookList")

const { Json } = require("sequelize/dist/lib/utils")



sequelize.sync({alter:true}).then(()=>{
    console.log("同步完成");   
})

User.hasMany(ReadTable);
ReadTable.belongsTo(User);
Book.hasMany(ReadTable);
ReadTable.belongsTo(Book);

User.hasMany(BookList);
BookList.belongsTo(User);
Book.hasMany(BookList);
BookList.belongsTo(Book);

